/*
 * @Author: xushuhao
 * @Email: xshmouse@163.com
 * @Date: 2020-04-22 16:57:22
 * @Last Modified by: zhangxiao
 * @Last Modified time: 2020-06-02 16:13:47
 * @Last Modified by: xushuhao
 * @Last Modified time: 2020-06-16 10:44:52
 * @Description: 统一管理网络请求，已在G对象中静态化可以直接使用。
 */

import 'package:dio/dio.dart';
import 'package:flutter_code_framework/network/init_dio.dart';
import 'package:flutter_code_framework/network/req_common.dart';
import 'package:flutter_code_framework/network/req_grade.dart';
import 'package:flutter_code_framework/network/req_guide.dart';
import 'package:flutter_code_framework/network/req_search.dart';
import 'package:flutter_code_framework/network/req_period.dart';
import 'package:flutter_code_framework/network/req_subject.dart';
import 'package:flutter_code_framework/network/req_user.dart';
import 'package:flutter_code_framework/network/req_class.dart';
import 'package:flutter_code_framework/network/req_lesson.dart';
import 'package:flutter_code_framework/network/req_book.dart';
import 'package:flutter_code_framework/network/req_version.dart';
import 'package:flutter_code_framework/network/req_bookmenu.dart';
import 'package:flutter_code_framework/network/req_homeworkclass.dart';
import 'package:flutter_code_framework/network/req_homeworkstudentinfo.dart';
import 'package:flutter_code_framework/network/req_lesson_publish.dart';
import 'package:flutter_code_framework/network/req_resource.dart';

class Request {
  Dio _dio;

  Request() {
    _dio = initDio();
  }

  //下面罗列所有，网络请求相关对象与其方法

  //登陆
  ReqUser get user => ReqUser(_dio);

  //用户向导
  ReqUserGuide get userGuide => ReqUserGuide(_dio);

  //公共搜索
  ReqSearch get search => ReqSearch(_dio);

  //Common
  ReqCommon get common => ReqCommon(_dio);

  //版本信息
  ReqVersion get vertion => ReqVersion(_dio);

  ReqClass get classData => ReqClass(_dio);

  ReqPeriod get periodData => ReqPeriod(_dio);

  ReqGrade get gradeData => ReqGrade(_dio);

  ReqSubject get subjectData => ReqSubject(_dio);

  ReqLesson get lessonData => ReqLesson(_dio);

  ReqBook get bookData => ReqBook(_dio);

  //获取教材章节信息
  ReqBookMenu get bookMenuData => ReqBookMenu(_dio);

  //获取小作业班级学生信息
  ReqHomeworkClass get homeworkClassData => ReqHomeworkClass(_dio);

  //获取小作业学生作答情况及批阅
  ReqHomeworkStudentInfo get homeworkStudentInfoData =>
      ReqHomeworkStudentInfo(_dio);
  //课程发布
  ReqLessonPublish get lessonPublishData => ReqLessonPublish(_dio);
  //资源中心
  ReqResource get resourceData => ReqResource(_dio);
}
